window.onload = function() {
    var mains = document.getElementsByClassName("mains");
    var deletes = document.getElementsByClassName("main_delete");
    var centers = document.getElementsByClassName("center");
    // console.log(centers);
    for (var i = 0; i < mains.length; i++) {
        mains[i].suoYin = i;
        mains[i].onmousedown = function () {
            for (var i = 0; i < mains.length; i++) {
            mains[i].style.transform = "translateX(0px)";
            }
       
            mains[this.suoYin].style.transform = "translateX(-68px)";

         }
    for (var j = 0; j < deletes.length; j++) {
        deletes[j].index = j;
        deletes[j].onclick = function () {
            mains[this.index].style.display = "none";

        }
    }

    }
}